package net.ikenway.springboot.demo.Model.Dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author MasterKenway <zk@ikenway.net>
 * @Description
 * @date Created Date 12/17/2020
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProductDto {
    private Long productId;
    @NotNull(message = "产品名不能为空")
    @NotEmpty(message = "产品名不能为空")
    private String productName;

    private String preview;
    private String sortName;

    private Long sortId;

    private BigDecimal mediumPrice;
    private BigDecimal largePrice;

    @DecimalMin(value = "0") @DecimalMax(value = "1")
    private BigDecimal disCount;

    private Integer sellCounter;

    private Boolean deleted;
}
